// pages/address/edit/edit.less

// 定义主题色
@theme-color: #19be6b;

.switch-container {
  display: flex;
  justify-content: flex-end; // 让开关靠右显示
  align-items: center;
  height: 60rpx; // 给开关足够的点击区域
}

.custom-switch {
  position: relative;
  width: 80rpx;
  height: 44rpx;
  background-color: #e5e5e5;
  border-radius: 22rpx;
  transition: background-color 0.3s;
  cursor: pointer;

  .switch-handle {
    position: absolute;
    top: 4rpx;
    left: 4rpx;
    width: 36rpx;
    height: 36rpx;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
  }

  // 激活状态
  &.active {
    background-color: @theme-color;

    .switch-handle {
      transform: translateX(36rpx);
    }
  }
}
.form-wrapper {
  padding: 24rpx;
}

.form-block {
  background-color: #fff;
  border-radius: 16rpx;
  margin-bottom: 24rpx;
  padding: 0 24rpx;
}

.form-item {
  display: flex;
  padding: 28rpx 0;
  font-size: 28rpx;
  align-items: center;
  &:not(:last-child) {
    border-bottom: 1rpx solid #f0f0f0;
  }
}

.form-label {
  width: 180rpx;
  color: #333;
  flex-shrink: 0;

  &.required::before {
    content: '*';
    color: @theme-color;
    margin-right: 4rpx;
  }
}

.form-content {
  flex: 1;
  color: #333;
  .placeholder {
    color: #c8c9cc;
  }
}

// 带箭头的行
.form-item.arrow {
  align-items: center;
  &::after {
    content: '';
    display: inline-block;
    width: 16rpx;
    height: 16rpx;
    border-top: 3rpx solid #999;
    border-right: 3rpx solid #999;
    transform: rotate(45deg);
    margin-left: 10rpx;
  }
}

// 详细地址输入框
.textarea-input {
  width: 100%;
  min-height: 80rpx;
  line-height: 1.5;
}

// 自定义 Radio 样式
.custom-radio-group {
  display: flex;
  gap: 20rpx;
  .radio-btn {
    padding: 10rpx 28rpx;
    border: 1rpx solid #ddd;
    border-radius: 30rpx;
    background-color: #f7f8fa;
    color: #333;
    font-size: 26rpx;
    transition: all 0.2s;

    &.active {
      background-color: fade(@theme-color, 10%);
      color: @theme-color;
      border-color: @theme-color;
    }
  }
}


// 底部按钮
.save-button-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20rpx 40rpx;
  padding-bottom: calc(20rpx + constant(safe-area-inset-bottom));
  padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
}

